class Solution {
    List<Character> list = new ArrayList<>();
    //定义一个哈希表来存放各种情况
    HashMap<Character,String> map = new HashMap<Character,String>();
    List<String> re = new ArrayList<String>();
    public List<String> letterCombinations(String digits) {
        if(digits == null || digits.isEmpty()){
            return re;
        }
        //把全部的情况列出来
        map.put('2',"abc");
        map.put('3',"def");
        map.put('4',"ghi");
        map.put('5',"jkl");
        map.put('6',"mno");
        map.put('7',"pqrs");
        map.put('8',"tuv");
        map.put('9',"wxyz");
        //回溯法
        letter(digits,0);
        return re;
    }
    public void letter(String digits, int begin){
        //获取现在对应的数字
        if(list.size() == digits.length()){
            StringBuilder b = new StringBuilder();
            for (int i = 0 ; i <list.size() ; i++){
                b.append(list.get(i));
            }
            re.add(b.toString());
            return;
        }
        //为什么要使用Character？ 因为要装箱和拆箱才可以对数进行操作
        Character digit = digits.charAt(begin);
        String letters = map.get(digit);
        for(int i = 0 ; i < letters.length() ; i++){
            list.add(letters.charAt(i));
            letter(digits,begin+1);
            list.remove(list.size()-1);
        }
    
    }
}

public class MainClass {
    public static String stringToString(String input) {
        if (input == null) {
            return "null";
        }
        return Json.value(input).toString();
    }
    
    public static String stringListToString(List<String> stringList) {
        StringBuilder sb = new StringBuilder("[");
        for (String item : stringList) {
            sb.append(item);
            sb.append(",");
        }
    
        sb.setCharAt(sb.length() - 1, ']');
        return sb.toString();
    }
    
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String line;
        while ((line = in.readLine()) != null) {
            String digits = stringToString(line);
            
            List<String> ret = new Solution().letterCombinations(digits);
            
            String out = stringListToString(ret);
            
            System.out.print(out);
        }
    }
}